#ifndef CONTINUE_H
#define CONTINUE_H
#include "config.h"
#include <boost/shared_ptr.hpp>
#include <boost/dynamic_bitset.hpp>

namespace cget {

class Continue;
typedef boost::shared_ptr<Continue> continue_ptr;
typedef boost::shared_ptr<boost::dynamic_bitset<> > dynamic_bitset_ptr;

class Continue {
public:
	Continue(Config& c);
	Continue(const string& cont_file);
	~Continue() { cout << "~Continue()" << endl; }
	void sync();
	void finishBlock(int blockno) { bs->set(blockno); }

	unsigned int getNumBlock() { return num_block; }

protected:
	string url;
	string host;
	string protocol;
	string port;
	string path;
	string filename;
	size_t filesize;
	unsigned int num_block;
	dynamic_bitset_ptr bs;
};

}

#endif
